<div class="box box-default">
  <div class="box-body">
    <form class="form-inline">
      <div class="box box-default">
        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
          <button *ngIf="_.includes(menuResourceSet,'btn-oto-download')" type="button" class="btn btn-primary" (click)="attachDownload()">
                <i class="fa fa-download"></i>下载</button>
          <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
                <i class="fa fa-minus"></i></button>
        </div>
        <div class="box-body" style="display:block">
          <div class="form-group col-lg-12" style="margin-bottom:10px !important;padding-left:0px !important;">
            <label>产品名称：</label>
            <input type="text" class="form-control" name="sFullName" [(ngModel)]="otoAttachBody.sFullName" placeholder="产品名称">
            <label>产品代码：</label>
            <input type="text" class="form-control" name="sFundCode" [(ngModel)]="otoAttachBody.sFundCode" placeholder="产品代码">

            <button type="button" class="btn btn-primary" (click)="getAttachList(1)">
                  <i class="fa fa-search"></i>查询</button>
          </div>
          <div class="form-group col-lg-12" style="padding-left:0px !important;">
            <label>附件名称：</label>
            <input type="text" class="form-control" name="sAttachName" [(ngModel)]="otoAttachBody.sAttachName" placeholder="附件名称">
            <label>附件类型：</label>
            <select class="form-control" name="sAttachParentCode" [(ngModel)]="otoAttachBody.sAttachParentCode" (ngModelChange)="getChildType(otoAttachBody.sAttachParentCode)">
                  <option [value]="''" selected="selected">全部</option>
                  <option [value]="item.sAttachTypeCode" *ngFor="let item of otoAttachConf">{{item.sAttachTypeName}}</option>
                </select>
            <label>子类型：</label>
            <select class="form-control" name="sAttachCode" [(ngModel)]="otoAttachBody.sAttachCode" placeholder="附件类型">
                  <option [value]="''" selected="selected">全部</option>
                  <option [value]="item.sAttachTypeCode" *ngFor="let item of fileChildType">{{item.sAttachTypeName}}</option>
                </select>
          </div>
        </div>
      </div>
    </form>

    <div class="box-body" style="padding-left:0px;padding-right:0px;">
      <div style="overflow-x:scroll;width:100%">
        <table id="fixed-table" class="table table-bordered table-hover table-keep-line table-striped" style="margin-top:unset !important;">
          <thead>
            <tr>
              <th style="padding-left:20px;" class="width-5">
                <div class="checkbox checkbox-primary">
                  <input type="checkbox" id="checkboxAll" [(ngModel)]="isCheckedAll" (ngModelChange)="checkedAll()">
                  <label>
                </label>
                </div>
              </th>
              <th class="width-8" (click)="orderData('sFundCode')">产品代码<i class="fa fa-sort"></i></th>
              <th class="width-17" (click)="orderData('sFullName')">产品名称<i class="fa fa-sort"></i></th>
              <th class="width-10" (click)="orderData('sFundTypeName')">产品类型<i class="fa fa-sort"></i></th>
              <th class="width-15" (click)="orderData('sAttachName')">附件名称<i class="fa fa-sort"></i></th>
              <th class="width-10" (click)="orderData('sAttachParentType')">附件类型<i class="fa fa-sort"></i></th>
              <th class="width-10" (click)="orderData('sAttachType')">子类型<i class="fa fa-sort"></i></th>
              <th class="width-15" (click)="orderData('dCreateTime')">上传时间<i class="fa fa-sort"></i></th>
              <th class="width-10" (click)="orderData('sCreator')">上传人<i class="fa fa-sort"></i></th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let item of otoAttachList;let index = index;">
              <td style="padding-left:20px;" class="width-5">
                <div class="checkbox checkbox-primary">
                  <input type="checkbox" name="checkbox1" id="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                  <label></label>
                </div>
              </td>
              <td class="width-8 short_name" [attr.title]="item.sFundCode">{{item.sFundCode}}</td>
              <td class="width-17 short_name" [attr.title]="item.sFullName">{{item.sFullName}}</td>
              <td class="width-10 short_name" [attr.title]="item.sFundTypeName">{{item.sFundTypeName}}</td>
              <td class="width-15 short_name" [attr.title]="item.sAttachName">{{item.sAttachName}}</td>
              <td class="width-10 short_name" [attr.title]="item.sAttachParentType">{{item.sAttachParentType}}</td>
              <td class="width-10 short_name" [attr.title]="item.sAttachType">{{item.sAttachType}}</td>
              <td class="width-15 short_name" [attr.title]="item.dCreateTime">{{item.dCreateTime}}</td>
              <td class="width-10 short_name" [attr.title]="item.sCreator">{{item.sCreator}}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>

    <div class="box-footer clearfix">
      <app-pagination [currentPageNum]="otoAttachListPageInfo.currentPageNum" [pagesShow]="" [totalPages]="otoAttachListPageInfo.totalPages"
        (pageChanged)="otoAttachPageNavigation($event)">
        <div class="pull-left pagination-detail" data-pagination-additional="true">
          <span class="pagination-info">
                    当前显示第{{otoAttachListPageInfo.startRow}}到第{{otoAttachListPageInfo.endRow}}条，总共{{otoAttachListPageInfo.total}}条，
                </span>
          <span class="page-list">
                        每页记录
                    <span class="btn-group dropup">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            <span class="page-size">{{otoAttachListPageInfo.pageSize}}</span>
          <span class="caret"></span>
          </button>
          <ul class="dropdown-menu" role="menu">
            <li *ngFor="let i of otoAttachListPageInfo.pageList" role="menuitem" [class.active]="otoAttachListPageInfo.pageSize === i"
              (click)="otoAttachPagesizeChange(i)">
              <a>{{i}}</a>
            </li>
          </ul>
          </span>条
          </span>
        </div>
      </app-pagination>
    </div>
  </div>
</div>